//
//  XTXVideoCell.m
//  xiaotianxin
//
//  Created by txx on 2019/11/20.
//  Copyright © 2019 XYC. All rights reserved.
//

#import "XTXVideoCell.h"
#import "XTXVideoModel.h"
@interface XTXVideoCell ()
@property (weak, nonatomic) IBOutlet UIImageView *bgImageView;
@property (weak, nonatomic) IBOutlet UIButton *playBtn;

@end


@implementation XTXVideoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (IBAction)playBtnClick:(id)sender {
    if (self.playVideoBlock) {
        self.playVideoBlock();
    }
}

-(void)setVideoModel:(XTXVideoModel *)videoModel{
    _videoModel=videoModel;
    _playBtn.hidden=NO;
    [_bgImageView sd_setImageWithURL:[NSURL URLWithString:videoModel.image]];
}
-(void)setHeadImageStr:(NSString *)headImageStr{
    _headImageStr=headImageStr;
    _playBtn.hidden=YES;
    [_bgImageView sd_setImageWithURL:[NSURL URLWithString:headImageStr]];
}
@end
